/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Communication;

import java.util.EventObject;
import java.util.regex.Matcher;

/**Sent to LineGrepperMatchCompleteListeners when a LineGrepper finishes matching.
 * @author Aaron Heise
 */
public class LineGrepperMatchCompleteEvent extends EventObject {
    protected Matcher[] matches;

    /**Create a new event
     * @param source the LineGrabber that fired this event
     * @param matches the matching Matchers from source
     */
    public LineGrepperMatchCompleteEvent(LineGrepper source, Matcher[] matches) {
        super(source);
        this.matches = matches;
    }

    /**Get the Matcher objects that matched each pattern.
     * @return the Matchers
     */
    public Matcher[] getMatches() {
        return this.matches;
    }
}
